import chalk from 'chalk';
import { getUmzug } from '../lib/umzug';

export default async function () {
  try {
    const umzug = await getUmzug();
    await umzug.down();
    process.exit();
  } catch (err) {
    console.error('');
    console.error(`${chalk.red('ERROR:')} ${err.message || err}`);
    console.error('');
    process.exit(1);
  }
}
